package LuoGuACM;
//棋盘问题
import java.util.Scanner;
class Main3{

    static Scanner in = new Scanner(System.in);
    static int n = in.nextInt();
    static int m = in.nextInt();
    static int c = 0;
    static int z = 0;
    public static void main(String[] args) {
        for (int i = 1; i <= n; i++) {
            for (int j = 1; j <= m; j++) {
                z += Math.min(i,j);
                c += i*j - Math.min(i,j);
            }
        }
        System.out.println(z + " " + c);
    }

}